<template>
  <div>
    <el-card shadow="never">
      <el-menu :default-active="active" @select="onSelect">
        <!-- <el-menu-item v-for="item in constantRouterMap" :key="item.path" :index="item.path">
          <i :class="item.meta.icon"></i>
          <g-link :to="item.path" active-class="is-active">
            <span slot="title">{{item.meta.title}}</span>
          </g-link>
        </el-menu-item>-->
        <g-link
          :to="item.path"
          exact-active-class="is-active"
          v-for="item in constantRouterMap"
          :key="item.path"
          exact
        >
          <el-menu-item :index="item.path">
            <i :class="item.meta.icon"></i>
            <span slot="title">{{item.meta.title}}</span>
          </el-menu-item>
        </g-link>
      </el-menu>
    </el-card>
  </div>
</template>

<script>
import { constantRouterMap } from '../../router'
export default {
  data() {
    return {
      constantRouterMap,
      active: '',
      parentUrl: '',
      menuList: []
    }
  },
  computed: {},
  mounted() {},
  methods: {
    onSelect(index) {},
    openTokenDialog() {},
    cancellation() {}
  }
}
</script>

<style>
a:hover {
  text-decoration: none;
}
.is-active .el-menu-item {
  background-color: #ecf5ff !important;
}
.is-active span {
  color: #409eff !important;
}
</style>